package edu.asu.sapa.ground.update;


import edu.asu.sapa.ground.State;

public class FirstIntervalLoader extends Load {

	public FirstIntervalLoader(Update[] array) {
		super(array);
	}
	
	@Override
	public final boolean load(State s, Context c) {
		boolean possible = true;
		float f = c.finish;
		for (Update u : contents) {
			possible &= u.startBefore(s, c, s.time);
		}
		s.events.add(c,this,UpdateWrapper.FinishBefore,f);
		return possible;
	}
	
	public String toString() {
		return "\t(over all " + super.toString();
	}

}
